﻿@model ArivisTests.Models.TestCase
@using ArivisTests.Views;

<fieldset>
    <legend>TestCase</legend>

    <table class="display-table">
        <tr>
            <td class="display-label">
                @Html.DisplayNameFor(model => model.Scenario), @Html.DisplayNameFor(model => model.Scenario.Url)
            </td>
            <td class="display-field">
                @if (Model.Scenario != null)
                {
                    @Html.ActionLink(Model.Name, "Details", "TestScenario", new { id = Model.Scenario.Id }, null)<text>, </text>
                    @Html.DisplayFor(model => model.Scenario.Url)
                }
            </td>
        </tr>
        <tr>
            <td class="display-label">
                @Html.DisplayNameFor(model => model.Run)
            </td>
            <td class="display-field">
                @Html.ActionLink(Model.Run.Name, "Details", "TestRun",  new { id=Model.Run.Id }, null)
            </td>
        </tr>
        <tr>
            <td class="display-label">
                @Html.DisplayNameFor(model => model.Comment)
            </td>
            <td class="display-field">
                @Html.DisplayFor(model => model.Comment)
            </td>
        </tr>
        <tr>
            <td class="display-label">
                @Html.DisplayNameFor(model => model.Tickets)
            </td>
            <td class="display-field">
                @Html.DisplayTickets(Model.Scenario.TicketUrl, Model.Tickets)
            </td>
        </tr>
        <tr>
            <td class="display-label">
                @Html.DisplayNameFor(model => model.User)
            </td>
            <td class="display-field">
                @Html.DisplayFor(model => model.User.UserName)
            </td>
        </tr>
        <tr>
            <td class="display-label">
                @Html.DisplayNameFor(model => model.Result)
            </td>
            <td class="display-field">
                @Html.DisplayFor(model => model.Result.Name)
            </td>
        </tr>
    </table>

</fieldset>

